package com.passion.mq.context;

import com.passion.mq.core.MqSender;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 类描述：消息队列上下文
 *
 * @author ZhuYin
 * @since 2024年12月28日
 */
@Component
@ConditionalOnBean(MqSender.class)
public class MqContext {

    public static MqSender mqSender;
    @Resource
    public void setMqSender(MqSender mqSender) {
        MqContext.mqSender = mqSender;
    }

}
